package com.yc.chaoshi.cs_order.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yc.chaoshi.cs_order.mapper.PmsFenlei1Mapper;
import com.yc.chaoshi.entity.PmsFenlei1;
import com.yc.chaoshi.entity.PmsFenlei2;
import com.yc.chaoshi.entity.PmsGoods;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xz
 * @since 2022-08-04
 */
@RestController
@RequestMapping("/chaoshi/pmsFenlei1")
public class PmsFenlei1Controller {

    @Resource
    private PmsFenlei1Mapper pmsFenlei1Mapper;

    // 热门商品查询
    @RequestMapping("queryAll1")
    List<PmsFenlei1> queryAll1(){
        return pmsFenlei1Mapper.selectAll1();
    }

    @RequestMapping("findByAid")
    public PmsFenlei1 findById(@RequestParam int aid){
        return pmsFenlei1Mapper.selectById(aid);
    }

    @RequestMapping("queryAll2")
    List<PmsFenlei2> queryAll2(@RequestParam int aid){
        return pmsFenlei1Mapper.selectSeconds(aid);
    }
}

